using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._Workflow._DataManagement
{
    /// <summary>
    /// <para>Get Features By Job AOI</para>
    /// <para>Extracts features from a source geodatabase to a target geodatabase based on the Filter Feature Layer parameter value (or job AOI).</para>
    /// <para>根据过滤要素图层参数值（或作业 AOI）将要素从源地理数据库提取到目标地理数据库。</para>
    /// </summary>    
    [DisplayName("Get Features By Job AOI")]
    public class GetFeaturesByJobAOI : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GetFeaturesByJobAOI()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_job_id">
        /// <para>Job ID</para>
        /// <para>The job ID of the Workflow Manager (Classic) job that will be updated. The default area over which features will be extracted or replicated is also determined.</para>
        /// <para>将更新的 Workflow Manager （Classic） 作业的作业 ID。此外，还将确定提取或复制要素的默认区域。</para>
        /// </param>
        /// <param name="_source_database">
        /// <para>Source Database</para>
        /// <para>The path to the source database containing features to extract.</para>
        /// <para>包含要提取的要素的源数据库的路径。</para>
        /// </param>
        /// <param name="_target_database">
        /// <para>Target Database</para>
        /// <para>The database from which features will be extracted.</para>
        /// <para>将从中提取要素的数据库。</para>
        /// </param>
        /// <param name="_extract_operation">
        /// <para>Extract Operation</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the data will be copied to the target database or replicated to the target database.</para>
        ///   <bulletList>
        ///     <bullet_item>Extract Data—A copy of the features will be extracted to the target database. This is the default.</bullet_item><para/>
        ///     <bullet_item>Replicate Data—The features will be extracted as a replica.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是将数据复制到目标数据库还是复制到目标数据库。</para>
        ///   <bulletList>
        ///     <bullet_item>提取数据—要素的副本将提取到目标数据库。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>复制数据—要素将作为复本进行提取。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public GetFeaturesByJobAOI(long? _job_id, object _source_database, object _target_database, _extract_operation_value _extract_operation)
        {
            this._job_id = _job_id;
            this._source_database = _source_database;
            this._target_database = _target_database;
            this._extract_operation = _extract_operation;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Get Features By Job AOI";

        public override string CallName => "topographic.GetFeaturesByJobAOI";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_job_id, _source_database, _target_database, _extract_operation.GetGPValue(), _filter_feature, _filter_type.GetGPValue(), _replica_type.GetGPValue(), _database_path, _updated_database];

        /// <summary>
        /// <para>Job ID</para>
        /// <para>The job ID of the Workflow Manager (Classic) job that will be updated. The default area over which features will be extracted or replicated is also determined.</para>
        /// <para>将更新的 Workflow Manager （Classic） 作业的作业 ID。此外，还将确定提取或复制要素的默认区域。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _job_id { get; set; }


        /// <summary>
        /// <para>Source Database</para>
        /// <para>The path to the source database containing features to extract.</para>
        /// <para>包含要提取的要素的源数据库的路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source Database")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _source_database { get; set; }


        /// <summary>
        /// <para>Target Database</para>
        /// <para>The database from which features will be extracted.</para>
        /// <para>将从中提取要素的数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Database")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_database { get; set; }


        /// <summary>
        /// <para>Extract Operation</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the data will be copied to the target database or replicated to the target database.</para>
        ///   <bulletList>
        ///     <bullet_item>Extract Data—A copy of the features will be extracted to the target database. This is the default.</bullet_item><para/>
        ///     <bullet_item>Replicate Data—The features will be extracted as a replica.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是将数据复制到目标数据库还是复制到目标数据库。</para>
        ///   <bulletList>
        ///     <bullet_item>提取数据—要素的副本将提取到目标数据库。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>复制数据—要素将作为复本进行提取。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extract Operation")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _extract_operation_value _extract_operation { get; set; }

        public enum _extract_operation_value
        {
            /// <summary>
            /// <para>Extract Data</para>
            /// <para>Extract Data—A copy of the features will be extracted to the target database. This is the default.</para>
            /// <para>提取数据—要素的副本将提取到目标数据库。这是默认设置。</para>
            /// </summary>
            [Description("Extract Data")]
            [GPEnumValue("EXTRACT_DATA")]
            _EXTRACT_DATA,

            /// <summary>
            /// <para>Replicate Data</para>
            /// <para>Replicate Data—The features will be extracted as a replica.</para>
            /// <para>复制数据—要素将作为复本进行提取。</para>
            /// </summary>
            [Description("Replicate Data")]
            [GPEnumValue("REPLICATE_DATA")]
            _REPLICATE_DATA,

        }

        /// <summary>
        /// <para>Filter Feature Layer</para>
        /// <para>A feature layer with one selected feature that will be used to limit the extent of the data that will be extracted. If no filter feature is specified, the job AOI will be used.</para>
        /// <para>具有一个选定要素的要素图层，该要素将用于限制将要提取的数据范围。如果未指定筛选功能，则将使用作业 AOI。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Filter Feature Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _filter_feature { get; set; } = null;


        /// <summary>
        /// <para>Filter Spatial Relation</para>
        /// <para><xdoc>
        ///   <para>Specifies the spatial relationship between Source Database and Filter Feature Layer. This parameter is only used if the Extract Operation parameter is set to Extract Data.</para>
        ///   <bulletList>
        ///     <bullet_item>Intersects—Features from the Source Database parameter that intersect features in the Filter Feature Layer parameter will be extracted. This is the default.</bullet_item><para/>
        ///     <bullet_item>Contains—Features from the Source Database parameter that are contained in the selected feature in the Filter Feature Layer parameter will be extracted.</bullet_item><para/>
        ///     <bullet_item>Clip—Features from the Source Database parameter that intersect features in the Filter Feature Layer parameter will be extracted. Features are then split at the AOI boundary and only those in the AOI boundary will be kept.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定源数据库和过滤器要素图层之间的空间关系。仅当“提取操作”参数设置为“提取数据”时，才使用该参数。</para>
        ///   <bulletList>
        ///     <bullet_item>相交—将提取源数据库参数中与过滤器要素图层参数中的要素相交的要素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>包含 - 将提取源数据库参数中包含在过滤器要素图层参数所选要素中的要素。</bullet_item><para/>
        ///     <bullet_item>裁剪 - 将提取源数据库参数中与滤镜要素图层参数中的要素相交的要素。然后，在 AOI 边界处分割要素，仅保留 AOI 边界中的要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Filter Spatial Relation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _filter_type_value _filter_type { get; set; } = _filter_type_value._INTERSECTS;

        public enum _filter_type_value
        {
            /// <summary>
            /// <para>Intersects</para>
            /// <para>Intersects—Features from the Source Database parameter that intersect features in the Filter Feature Layer parameter will be extracted. This is the default.</para>
            /// <para>相交—将提取源数据库参数中与过滤器要素图层参数中的要素相交的要素。这是默认设置。</para>
            /// </summary>
            [Description("Intersects")]
            [GPEnumValue("INTERSECTS")]
            _INTERSECTS,

            /// <summary>
            /// <para>Contains</para>
            /// <para>Contains—Features from the Source Database parameter that are contained in the selected feature in the Filter Feature Layer parameter will be extracted.</para>
            /// <para>包含 - 将提取源数据库参数中包含在过滤器要素图层参数所选要素中的要素。</para>
            /// </summary>
            [Description("Contains")]
            [GPEnumValue("CONTAINS")]
            _CONTAINS,

            /// <summary>
            /// <para>Clip</para>
            /// <para>Clip—Features from the Source Database parameter that intersect features in the Filter Feature Layer parameter will be extracted. Features are then split at the AOI boundary and only those in the AOI boundary will be kept.</para>
            /// <para>裁剪 - 将提取源数据库参数中与滤镜要素图层参数中的要素相交的要素。然后，在 AOI 边界处分割要素，仅保留 AOI 边界中的要素。</para>
            /// </summary>
            [Description("Clip")]
            [GPEnumValue("CLIP")]
            _CLIP,

        }

        /// <summary>
        /// <para>Replica Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of replica that will be created. This parameter is only used if the Extract Operation parameter is set to Replicate Data.</para>
        ///   <bulletList>
        ///     <bullet_item>Two-way Replica—Changes can be sent between child and parent replicas in both directions.</bullet_item><para/>
        ///     <bullet_item>One-way Replica—Changes will be sent from the parent replica to the child replica only.</bullet_item><para/>
        ///     <bullet_item>Check Out—Data will be replicated, edited, and checked back in one time. This is the default.</bullet_item><para/>
        ///     <bullet_item>One-way Child To Parent Replica—Changes will be sent from the child replica to the parent replica only.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将创建的复制副本的类型。仅当“提取操作”参数设置为“复制数据”时，才使用此参数。</para>
        ///   <bulletList>
        ///     <bullet_item>双向复本 - 可以在子复本和父复本之间双向发送更改。</bullet_item><para/>
        ///     <bullet_item>单向复本 - 更改将仅从父复本发送到子复本。</bullet_item><para/>
        ///     <bullet_item>检出 - 数据将一次性复制、编辑和检回。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>单向子副本到父副本 - 更改将仅从子副本发送到父副本。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Replica Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _replica_type_value _replica_type { get; set; } = _replica_type_value._CHECK_OUT;

        public enum _replica_type_value
        {
            /// <summary>
            /// <para>Two-way Replica</para>
            /// <para>Two-way Replica—Changes can be sent between child and parent replicas in both directions.</para>
            /// <para>双向复本 - 可以在子复本和父复本之间双向发送更改。</para>
            /// </summary>
            [Description("Two-way Replica")]
            [GPEnumValue("TWO_WAY_REPLICA")]
            _TWO_WAY_REPLICA,

            /// <summary>
            /// <para>One-way Replica</para>
            /// <para>One-way Replica—Changes will be sent from the parent replica to the child replica only.</para>
            /// <para>单向复本 - 更改将仅从父复本发送到子复本。</para>
            /// </summary>
            [Description("One-way Replica")]
            [GPEnumValue("ONE_WAY_REPLICA")]
            _ONE_WAY_REPLICA,

            /// <summary>
            /// <para>Check Out</para>
            /// <para>Check Out—Data will be replicated, edited, and checked back in one time. This is the default.</para>
            /// <para>检出 - 数据将一次性复制、编辑和检回。这是默认设置。</para>
            /// </summary>
            [Description("Check Out")]
            [GPEnumValue("CHECK_OUT")]
            _CHECK_OUT,

            /// <summary>
            /// <para>One-way Child To Parent Replica</para>
            /// <para>One-way Child To Parent Replica—Changes will be sent from the child replica to the parent replica only.</para>
            /// <para>单向子副本到父副本 - 更改将仅从子副本发送到父副本。</para>
            /// </summary>
            [Description("One-way Child To Parent Replica")]
            [GPEnumValue("ONE_WAY_CHILD_TO_PARENT_REPLICA")]
            _ONE_WAY_CHILD_TO_PARENT_REPLICA,

        }

        /// <summary>
        /// <para>Input Database Path</para>
        /// <para>The Workflow Manager (Classic) database connection file (.jtc) that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database will be used.</para>
        /// <para>包含作业信息的 Workflow Manager （Classic） 数据库连接文件 （.jtc）。如果未指定连接文件，则将使用当前默认的 Workflow Manager （Classic） 数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Path")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _database_path { get; set; } = null;


        /// <summary>
        /// <para>Updated Database</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Database")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_database { get; set; }


        public GetFeaturesByJobAOI SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}